<?php

// get the name of the current file
$file 	= $_SERVER['SCRIPT_NAME'];
$parts	= explode('/', $file);
$file	= $parts[count($parts)-1];


// show the form
displayForm();




/**
 * Show form
 */
function displayForm() { ?>

	<html>
	
	<head>
	<title>form example</title>
	<link rel="stylesheet" type="text/css" href="forms.css">
	</head>
	
	
	<body>
	
		<div id="mystyle" class="myform">
			
				<form id="form" action="<?php echo $file;?>" method="get">
	
					<fieldset>
						<legend>Login</legend>
	
						<p>
							<label for="lbl_name"> Name: </label> 
							<input type="text" name="name" />
	
						</p>
	
						<p>
							<label for="lbl_email"> email: </label> 
							<input type="text" name="email" />
						</p>
						
						<p>
							<label for="lbl_password"> password: </label> 
							<input type="password" name="password" />
						</p>
						
						<p>
							<label for="lbl_description">Description: </label>
							<textarea name="description" rows="6" cols="26">Text, text and more text ...</textarea>
						</p>
	
						<p class="submit">
							<input type="submit" value="ok" />
						</p>
	
					</fieldset>
	
				</form>
			
		</div>
	
	</body>




	<?php 
}?>
	
	



</html>
